
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Linux 主机、虚拟机和docker网络配置 · 日常学习笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-footer-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Linux文件系统学习.html" />
    
    
    <link rel="prev" href="APT-剖析详解.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"Xiechengqi","repo":"LearningNotes","type":"star","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../网络学习资源整理/">
            
                <a href="../网络学习资源整理/">
            
                    
                    网络学习资源整理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../网络学习资源整理/技术学习.html">
            
                <a href="../网络学习资源整理/技术学习.html">
            
                    
                    技术学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../网络学习资源整理/运维博客.html">
            
                <a href="../网络学习资源整理/运维博客.html">
            
                    
                    运维博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../网络学习资源整理/工具.html">
            
                <a href="../网络学习资源整理/工具.html">
            
                    
                    工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../网络学习资源整理/静态博客模板.html">
            
                <a href="../网络学习资源整理/静态博客模板.html">
            
                    
                    静态博客模板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../网络学习资源整理/静态网站pages服务.html">
            
                <a href="../网络学习资源整理/静态网站pages服务.html">
            
                    
                    静态网站pages服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../网络学习资源整理/静态pages的CI和CD.html">
            
                <a href="../网络学习资源整理/静态pages的CI和CD.html">
            
                    
                    静态pages的CI和CD
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../网络学习资源整理/Hugo学习.html">
            
                <a href="../网络学习资源整理/Hugo学习.html">
            
                    
                    Hugo学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../心灵鸡汤/">
            
                <a href="../心灵鸡汤/">
            
                    
                    心灵鸡汤
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../心灵鸡汤/心灵鸡汤.html">
            
                <a href="../心灵鸡汤/心灵鸡汤.html">
            
                    
                    语录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    Linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="Linux常用命令.html">
            
                <a href="Linux常用命令.html">
            
                    
                    Linux常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="Linux小知识.html">
            
                <a href="Linux小知识.html">
            
                    
                    平时 linux 遇到的问题解决办法和扩展小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="Linux性能相关常用命令.html">
            
                <a href="Linux性能相关常用命令.html">
            
                    
                    Linux性能相关常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="Linux各种安装下载慢解决方法.html">
            
                <a href="Linux各种安装下载慢解决方法.html">
            
                    
                    Linux各种安装下载慢解决方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="APT-剖析详解.html">
            
                <a href="APT-剖析详解.html">
            
                    
                    APT 原理剖析、详解
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.6" data-path="Linux主机、虚拟机和docker网络配置.html">
            
                <a href="Linux主机、虚拟机和docker网络配置.html">
            
                    
                    Linux 主机、虚拟机和docker网络配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="Linux文件系统学习.html">
            
                <a href="Linux文件系统学习.html">
            
                    
                    Linux文件系统学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="Linux用户和用户组管理.html">
            
                <a href="Linux用户和用户组管理.html">
            
                    
                    Linux用户和用户组管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="Linux用户增删改等学习.html">
            
                <a href="Linux用户增删改等学习.html">
            
                    
                    Linux用户增删改等学习.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="Linux程序存放目录.html">
            
                <a href="Linux程序存放目录.html">
            
                    
                    Linux程序存放目录.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11" data-path="Linux编译安装软件包详解.html">
            
                <a href="Linux编译安装软件包详解.html">
            
                    
                    Linux C/C++ 软件包编译、安装原理详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.12" data-path="SSH详解.html">
            
                <a href="SSH详解.html">
            
                    
                    SSH 详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.13" data-path="Tomcat和Ngnix和Apache.html">
            
                <a href="Tomcat和Ngnix和Apache.html">
            
                    
                    Tomcat和Ngnix和Apache.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.14" data-path="UbuntuSoftwareInstall.html">
            
                <a href="UbuntuSoftwareInstall.html">
            
                    
                    Ubuntu 软件包安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.15" data-path="YAML-配置文件语言.html">
            
                <a href="YAML-配置文件语言.html">
            
                    
                    YAML 配置文件语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.16" data-path="bin目录详解.html">
            
                <a href="bin目录详解.html">
            
                    
                    bin目录详解.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.17" data-path="ffmpeg详解.html">
            
                <a href="ffmpeg详解.html">
            
                    
                    ffmpeg学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.18" data-path="trans命令.html">
            
                <a href="trans命令.html">
            
                    
                    trans命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.19" data-path="yum和rpm.html">
            
                <a href="yum和rpm.html">
            
                    
                    Yum 和 RPM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.20" data-path="从BashShell启动“窥探”Linux环境变量相关文件.html">
            
                <a href="从BashShell启动“窥探”Linux环境变量相关文件.html">
            
                    
                    Linux环境变量详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.21" data-path="新创建主机常用初始化配置.html">
            
                <a href="新创建主机常用初始化配置.html">
            
                    
                    新建主机常用初始化配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.22" data-path="正则表达式学习.html">
            
                <a href="正则表达式学习.html">
            
                    
                    正则表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.23" data-path="通过Linux开机启动项展开学习.html">
            
                <a href="通过Linux开机启动项展开学习.html">
            
                    
                    Linux开机启动项学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.24" data-path="防火墙学习.html">
            
                <a href="防火墙学习.html">
            
                    
                    防火墙学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Python/">
            
                <a href="../Python/">
            
                    
                    Python
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Python/BeautifulSoup.md">
            
                <span>
            
                    
                    Python3 BeautifulSoup 学习记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../Python/Django.html">
            
                <a href="../Python/Django.html">
            
                    
                    Python Django 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../Python/IPython使用技巧.html">
            
                <a href="../Python/IPython使用技巧.html">
            
                    
                    IPython 使用技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../Python/Numpy.html">
            
                <a href="../Python/Numpy.html">
            
                    
                    Python Numpy 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../Python/Python小知识.html">
            
                <a href="../Python/Python小知识.html">
            
                    
                    Python 学习遇到的问题解决或扩展小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../Python/Python模块管理总结.html">
            
                <a href="../Python/Python模块管理总结.html">
            
                    
                    Python 模块管理总结
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../Python/flask学习.md">
            
                <span>
            
                    
                    Flask 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../Python/matplotlib.html">
            
                <a href="../Python/matplotlib.html">
            
                    
                    matplotlib.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../Python/re正则表达式.html">
            
                <a href="../Python/re正则表达式.html">
            
                    
                    re正则表达式.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="../Python/图形界面学习.html">
            
                <a href="../Python/图形界面学习.html">
            
                    
                    图形界面学习.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="../Python/常用图像库学习.html">
            
                <a href="../Python/常用图像库学习.html">
            
                    
                    Python3 常用图像库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="../Python/进阶学习.html">
            
                <a href="../Python/进阶学习.html">
            
                    
                    Python3 进阶学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Shell/">
            
                <a href="../Shell/">
            
                    
                    Shell
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Shell/shell小知识.html">
            
                <a href="../Shell/shell小知识.html">
            
                    
                    Shell小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Shell/Shell奇淫技巧.html">
            
                <a href="../Shell/Shell奇淫技巧.html">
            
                    
                    Shell奇淫技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Shell/Linux文本操作三大利器-grep、sed、awk.html">
            
                <a href="../Shell/Linux文本操作三大利器-grep、sed、awk.html">
            
                    
                    grep、sed、awk 详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Shell/Shell文本处理常用工具补遗.html">
            
                <a href="../Shell/Shell文本处理常用工具补遗.html">
            
                    
                    Shell文本处理常用工具补遗
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Shell/句子解析.html">
            
                <a href="../Shell/句子解析.html">
            
                    
                    句子解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Shell/识别是否是root用户.html">
            
                <a href="../Shell/识别是否是root用户.html">
            
                    
                    识别是否是root用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Shell/识别系统.html">
            
                <a href="../Shell/识别系统.html">
            
                    
                    识别系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Vim/">
            
                <a href="../Vim/">
            
                    
                    Vim
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Vim/Vim小知识.html">
            
                <a href="../Vim/Vim小知识.html">
            
                    
                    Vim小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Vim/Vim编辑器再学习.html">
            
                <a href="../Vim/Vim编辑器再学习.html">
            
                    
                    Vim编辑器再学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Vim/VimScript学习笔记.html">
            
                <a href="../Vim/VimScript学习笔记.html">
            
                    
                    VimScript 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Vim/YouCompleteMe安装.html">
            
                <a href="../Vim/YouCompleteMe安装.html">
            
                    
                    YouCompleteMe安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../Vim/vimrc示例1.html">
            
                <a href="../Vim/vimrc示例1.html">
            
                    
                    vimrc示例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../Vim/vimrc备份.html">
            
                <a href="../Vim/vimrc备份.html">
            
                    
                    vimrc备份
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../Vim/Tmux快捷键.html">
            
                <a href="../Vim/Tmux快捷键.html">
            
                    
                    Tmux快捷键
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../Ansible/">
            
                <a href="../Ansible/">
            
                    
                    Ansible
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../Ansible/术语表.html">
            
                <a href="../Ansible/术语表.html">
            
                    
                    术语表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../Ansible/Ansible必知单词.html">
            
                <a href="../Ansible/Ansible必知单词.html">
            
                    
                    Ansible 常用单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../Ansible/Ansible学习.html">
            
                <a href="../Ansible/Ansible学习.html">
            
                    
                    Ansible 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../Ansible/Ansible常用模板.html">
            
                <a href="../Ansible/Ansible常用模板.html">
            
                    
                    Ansible常用模板.md
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../Docker/">
            
                <a href="../Docker/">
            
                    
                    Docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../Docker/Docker基础学习.html">
            
                <a href="../Docker/Docker基础学习.html">
            
                    
                    Docker 基础学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../Docker/Docker小知识.html">
            
                <a href="../Docker/Docker小知识.html">
            
                    
                    Docker 小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../Docker/Docker必知单词.html">
            
                <a href="../Docker/Docker必知单词.html">
            
                    
                    Docker 学习中的单词
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../Git/">
            
                <a href="../Git/">
            
                    
                    Git
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../Git/git学习.html">
            
                <a href="../Git/git学习.html">
            
                    
                    Git 学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../Git/git小技巧.html">
            
                <a href="../Git/git小技巧.html">
            
                    
                    Git 小技巧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../Zabbix/">
            
                <a href="../Zabbix/">
            
                    
                    Zabbix
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../Zabbix/Docker安装配置Zabbix.html">
            
                <a href="../Zabbix/Docker安装配置Zabbix.html">
            
                    
                    Docker 安装配置 Zabbix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../Zabbix/术语单词.html">
            
                <a href="../Zabbix/术语单词.html">
            
                    
                    Zabbix 中常用单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../Zabbix/重置密码.html">
            
                <a href="../Zabbix/重置密码.html">
            
                    
                    重置 Zabbix 账户密码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../KVM/">
            
                <a href="../KVM/">
            
                    
                    KVM
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../KVM/安装配置.html">
            
                <a href="../KVM/安装配置.html">
            
                    
                    常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../KVM/虚拟机网络配置.html">
            
                <a href="../KVM/虚拟机网络配置.html">
            
                    
                    Bridged 桥接模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../Mysql/">
            
                <a href="../Mysql/">
            
                    
                    Mysql
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../Mysql/Ubuntu安装Navicat.html">
            
                <a href="../Mysql/Ubuntu安装Navicat.html">
            
                    
                    Ubuntu 安装及配置 Navicat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../Mysql/忘记root密码.html">
            
                <a href="../Mysql/忘记root密码.html">
            
                    
                    如何替换已忘记的 root 密码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../Nginx/">
            
                <a href="../Nginx/">
            
                    
                    Nginx
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../Nginx/Nginx学习笔记.html">
            
                <a href="../Nginx/Nginx学习笔记.html">
            
                    
                    Nginx 学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../NoClass/">
            
                <a href="../NoClass/">
            
                    
                    闲知
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../NoClass/容易读错的IT术语.html">
            
                <a href="../NoClass/容易读错的IT术语.html">
            
                    
                    容易读错的IT术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="../NoClass/Linux-electron-tutorial.html">
            
                <a href="../NoClass/Linux-electron-tutorial.html">
            
                    
                    Linux electron 学习记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.3" data-path="../NoClass/MarkdownSkills.html">
            
                <a href="../NoClass/MarkdownSkills.html">
            
                    
                    记录 Markdown 的各种小技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.4" data-path="../NoClass/RaspeberryPi.html">
            
                <a href="../NoClass/RaspeberryPi.html">
            
                    
                    使用树莓派 3B 遇到的问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.5" data-path="../NoClass/华为国产手机芯片SoC.html">
            
                <a href="../NoClass/华为国产手机芯片SoC.html">
            
                    
                    华为国产手机芯片SoC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.6" data-path="../NoClass/图片格式详解及其对比.html">
            
                <a href="../NoClass/图片格式详解及其对比.html">
            
                    
                    图片格式详解及其对比
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.7" data-path="../NoClass/计算机小知识.html">
            
                <a href="../NoClass/计算机小知识.html">
            
                    
                    记录一些计算机的小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.8" data-path="../NoClass/诗词.html">
            
                <a href="../NoClass/诗词.html">
            
                    
                    诗词
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../OS/">
            
                <a href="../OS/">
            
                    
                    OS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" data-path="../OS/学习笔记.html">
            
                <a href="../OS/学习笔记.html">
            
                    
                    操作系统学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.2" data-path="../OS/术语单词.html">
            
                <a href="../OS/术语单词.html">
            
                    
                    OS 专业词语解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.3" data-path="../OS/SoCCPU.html">
            
                <a href="../OS/SoCCPU.html">
            
                    
                    SoC 与 CPU
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../Tomcat/">
            
                <a href="../Tomcat/">
            
                    
                    Tomcat
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="../Tomcat/Tomcat 学习.html">
            
                <a href="../Tomcat/Tomcat 学习.html">
            
                    
                    Tomcat 学习
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../Tomcat/Tomcat学习.html">
            
                <a href="../Tomcat/Tomcat学习.html">
            
                    
                    Tomcat 学习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="../VPS/">
            
                <a href="../VPS/">
            
                    
                    VPS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" data-path="../VPS/AWS_lightsail.html">
            
                <a href="../VPS/AWS_lightsail.html">
            
                    
                    AWS LightSail
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.2" data-path="../VPS/GCP_VM实例创建和基本配置.html">
            
                <a href="../VPS/GCP_VM实例创建和基本配置.html">
            
                    
                    GCP VM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.3" data-path="../VPS/ECS和VPS等等.html">
            
                <a href="../VPS/ECS和VPS等等.html">
            
                    
                    ECS和VPS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="../ComputerComposition/">
            
                <a href="../ComputerComposition/">
            
                    
                    ComputerComposition
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.19.1" data-path="../ComputerComposition/学习笔记.html">
            
                <a href="../ComputerComposition/学习笔记.html">
            
                    
                    计算机组成原理学习笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="../ComputerNetwork/">
            
                <a href="../ComputerNetwork/">
            
                    
                    ComputerNetwork
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.20.1" data-path="../ComputerNetwork/ProWords.html">
            
                <a href="../ComputerNetwork/ProWords.html">
            
                    
                    术语单词
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.2" data-path="../ComputerNetwork/学习笔记.html">
            
                <a href="../ComputerNetwork/学习笔记.html">
            
                    
                    计算机网络学习笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.3" data-path="../ComputerNetwork/小知识.html">
            
                <a href="../ComputerNetwork/小知识.html">
            
                    
                    学习计算机网络中的小知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20.4" data-path="../NoClass/浏览器架构简析.md">
            
                <span>
            
                    
                    浏览器架构简析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="../毕业论文/">
            
                <a href="../毕业论文/">
            
                    
                    毕业论文
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.21.1" data-path="../毕业论文/开题报告.html">
            
                <a href="../毕业论文/开题报告.html">
            
                    
                    开题报告
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Linux 主机、虚拟机和docker网络配置</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="linux-&#x4E3B;&#x673A;&#x3001;&#x865A;&#x62DF;&#x673A;&#x548C;docker&#x7F51;&#x7EDC;&#x914D;&#x7F6E;"><a name="linux-&#x4E3B;&#x673A;&#x3001;&#x865A;&#x62DF;&#x673A;&#x548C;docker&#x7F51;&#x7EDC;&#x914D;&#x7F6E;" class="plugin-anchor" href="#linux-&#x4E3B;&#x673A;&#x3001;&#x865A;&#x62DF;&#x673A;&#x548C;docker&#x7F51;&#x7EDC;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>Linux &#x4E3B;&#x673A;&#x3001;&#x865A;&#x62DF;&#x673A;&#x548C;docker&#x7F51;&#x7EDC;&#x914D;&#x7F6E;</h1>
<blockquote>
<p>&#x4F7F;&#x7528;&#x8FC7; VMware &#x3001;VirtualBox&#x3001;KVM&#xFF0C;&#x4F46;&#x4E00;&#x76F4;&#x4E0D;&#x592A;&#x559C;&#x6B22;&#xFF0C;&#x6700;&#x4E3B;&#x8981;&#x7684;&#x539F;&#x56E0;&#x5C31;&#x662F;&#x7E41;&#x7410;&#x7684;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#xFF0C;&#x4F8B;&#x5982; NAT&#x3001;&#x6865;&#x63A5;&#x3001;Host-Only &#x90FD;&#x5565;&#x610F;&#x601D;&#xFF0C;&#x4E00;&#x76F4;&#x4E0D;&#x61C2;&#xFF0C;&#x4E00;&#x76F4;&#x90FD;&#x662F;&#x6309;&#x7740;&#x7F51;&#x4E0A;&#x5B89;&#x88C5;&#x6559;&#x7A0B;&#x50BB;&#x74DC;&#x5F0F;&#x64CD;&#x4F5C;&#xFF0C;&#x6700;&#x8FD1;&#x9700;&#x8981;&#x642D;&#x5EFA;&#x591A;&#x53F0;&#x865A;&#x62DF;&#x673A;&#xFF0C;&#x5355;&#x662F;&#x4E00;&#x4E2A;&#x91CC;&#x9762; ping &#x5916;&#x9762;&#x3001;&#x5916;&#x9762; ping &#x91CC;&#x9762;&#x3001;&#x865A;&#x62DF;&#x673A;&#x4E92;&#x76F8; ping&#xFF0C;&#x5C31;&#x5F04;&#x5F97;&#x6211;&#x6655;&#x5934;&#x8F6C;&#x5411;&#xFF01;&#x5173;&#x952E;&#x8FD8;&#x662F;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x7684;&#x77ED;&#x677F;&#xFF0C;&#x7279;&#x6765;&#x8BB0;&#x5F55;&#x4E00;&#x4E0B;&#x51E0;&#x5929;&#x6765;&#x7684;&#x5B66;&#x4E60;&#xFF01;</p>
</blockquote>
<h2 id="&#x80CC;&#x666F;&#x5B66;&#x4E60;"><a name="&#x80CC;&#x666F;&#x5B66;&#x4E60;" class="plugin-anchor" href="#&#x80CC;&#x666F;&#x5B66;&#x4E60;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x80CC;&#x666F;&#x5B66;&#x4E60;</h2>
<h3 id="1&#x3001;ip&#x3001;netmask&#x3001;gateway&#x3001;dns"><a name="1&#x3001;ip&#x3001;netmask&#x3001;gateway&#x3001;dns" class="plugin-anchor" href="#1&#x3001;ip&#x3001;netmask&#x3001;gateway&#x3001;dns"><i class="fa fa-link" aria-hidden="true"></i></a>1&#x3001;IP&#x3001;NetMask&#x3001;GateWay&#x3001;DNS</h3>
<blockquote>
<p>&#x68C0;&#x67E5; DNS &#x662F;&#x5426;&#x6B63;&#x5E38;&#xFF1A;&#x56E0;&#x4E3A; QQ &#x4E0D;&#x9700;&#x8981;&#x6709; DNS ( QQ &#x53EA;&#x662F;&#x4E00;&#x4E2A;&#x5BA2;&#x6237;&#x7AEF;&#x7A0B;&#x5E8F;&#xFF0C;&#x7528;&#x4E0D;&#x5230; DNS)&#xFF0C;&#x53EA;&#x6709;&#x6D4F;&#x89C8;&#x7F51;&#x9875; ( &#x9700;&#x8F93;&#x5165;&#x7F51;&#x5740;&#x65F6; ) &#x624D;&#x7528;&#x5230; DNS&#xFF0C;&#x6240;&#x4EE5;&#x5982;&#x679C;&#x51FA;&#x73B0; QQ &#x80FD;&#x7528;&#x4F46;&#x6D4F;&#x89C8;&#x5668;&#x8FDE;&#x4E0D;&#x4E0A;&#x7F51;&#xFF0C;&#x5219;&#x5F88;&#x53EF;&#x80FD;&#x662F; DNS &#x51FA;&#x73B0;&#x95EE;&#x9898;</p>
</blockquote>
<p><strong><code>Sub NetMask - &#x5B50;&#x7F51;&#x63A9;&#x7801;</code></strong></p>
<ul>
<li>&#x5B50;&#x7F51;&#x63A9;&#x7801; - &#x7528;&#x6765;&#x5224;&#x65AD;&#x4EFB;&#x610F;&#x4E24;&#x53F0;&#x8BA1;&#x7B97;&#x673A;&#x7684; IP &#x5730;&#x5740;&#x662F;&#x5426;&#x5C5E;&#x4E8E;&#x540C;&#x4E00;&#x5B50;&#x7F51;&#x7EDC;</li>
</ul>
<p>&#x5BF9;&#x4E8E;&#x4E00;&#x53F0;&#x8BA1;&#x7B97;&#x673A;&#x6765;&#x8BF4;&#xFF0C;&#x5DEE;&#x4E0D;&#x591A;&#x6709;&#x4E09;&#x79CD;&#x573A;&#x5408;&#x7684;&#x901A;&#x4FE1;</p>
<p>1&#xFF09;&#x81EA;&#x5DF1;&#x4E0E;&#x81EA;&#x5DF1;&#x901A;&#x4FE1;</p>
<p>2&#xFF09;&#x4E0E;&#x672C;&#x7F51;&#x6BB5;&#x5176;&#x5B83;&#x4E3B;&#x673A;&#x901A;&#x4FE1;</p>
<p>3&#xFF09;&#x4E0E;&#x522B;&#x7684;&#x7F51;&#x6BB5;&#x4E3B;&#x673A;&#x7684;&#x901A;&#x4FE1;</p>
<p>&#x5B50;&#x7F51;&#x63A9;&#x7801;&#x5C31;&#x662F;&#x4E3A;&#x4E86;&#x5206;&#x8FA8;&#x51FA;&#x4EE5;&#x4E0A;&#x4E09;&#x4E2A;&#x573A;&#x666F;&#x800C;&#x8BBE;&#x8BA1;&#x7684;</p>
<p><strong>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;</strong>&#xFF1A;10.10.10.1  255.255.255.0
&#x5176;&#x4E2D; <code>255.255.255.0</code> &#x5C31;&#x662F;&#x7F51;&#x7EDC;&#x63A9;&#x7801;&#xFF0C;&#x7531;&#x4E8E;&#x8FD9;&#x4E2A;&#x63A9;&#x7801;&#x5168; 1 &#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x4F4D;&#x957F;&#x4E3A; 24&#x4F4D;&#xFF0C;&#x6211;&#x4EEC;&#x4E5F;&#x7ECF;&#x5E38;&#x5199;&#x4E3A; 10.10.20.1/24</p>
<ul>
<li><p><strong>&#x81EA;&#x5DF1;&#x4E0E;&#x81EA;&#x5DF1;&#x901A;&#x4FE1;</strong>
&#x5F53; <code>ping 10.10.10.1</code> &#x65F6;&#xFF0C;&#x8BA1;&#x7B97;&#x673A;&#x548C;&#x81EA;&#x5DF1;&#x7684;IP&#x76F8;&#x6BD4;&#x8F83;&#xFF0C;&#x6240;&#x4EE5;&#x4F1A;&#x53D1;&#x7ED9;&#x81EA;&#x5DF1;&#xFF0C;&#x6211;&#x4EEC;&#x79F0;&#x4E4B;&#x4E3A;<strong>&#x7CBE;&#x786E;&#x5339;&#x914D;</strong></p>
</li>
<li><p><strong>&#x4E0E;&#x672C;&#x7F51;&#x6BB5;&#x5176;&#x5B83;&#x4E3B;&#x673A;&#x901A;&#x4FE1;</strong>
&#x5F53; <code>ping 10.10.10.2</code> &#x65F6;&#xFF0C;&#x8BA1;&#x7B97;&#x673A;&#x548C;&#x81EA;&#x5DF1;&#x7684; IP &#x76F8;&#x6BD4;&#x8F83;&#xFF0C;&#x53D1;&#x73B0;&#x5E76;&#x4E0D;&#x76F8;&#x7B49;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x9000;&#x800C;&#x6C42;&#x5176;&#x6B21;&#xFF0C;&#x4F7F;&#x7528;<strong>&#x6A21;&#x7CCA;&#x5339;&#x914D;</strong>&#xFF0C;&#x7528;&#x81EA;&#x5DF1;&#x7684;&#x63A9;&#x7801; <code>255.255.255.0</code> &#x4E0E; <code>10.10.10.2</code> &#x505A;&#x6309;&#x4F4D;&#x4E0E;&#xFF0C;&#x5F97;&#x5230;&#x7F51;&#x6BB5; <code>10.10.10</code>&#xFF0C;&#x8FD9;&#x4E2A;&#x548C;&#x81EA;&#x5DF1;&#x5728;&#x4E00;&#x4E2A;&#x7F51;&#x6BB5;&#xFF08;&#x4E00;&#x4E2A;&#x5E7F;&#x64AD;&#x57DF;&#xFF09;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x5E7F;&#x64AD; ARP &#x5F97;&#x5230;&#x5BF9;&#x65B9;&#x7684; MAC&#xFF0C;&#x5B8C;&#x6210;&#x901A;&#x4FE1;&#x3002;</p>
</li>
<li><p><strong>&#x4E0E;&#x522B;&#x7684;&#x7F51;&#x6BB5;&#x4E3B;&#x673A;&#x7684;&#x901A;&#x4FE1;</strong>
&#x5F53; <code>ping 8.8.8.8</code> &#x65F6;&#xFF0C;&#x8BA1;&#x7B97;&#x673A;&#x548C;&#x81EA;&#x5DF1;&#x7684; IP &#x76F8;&#x6BD4;&#x8F83;&#xFF0C;&#x53D1;&#x73B0;&#x5E76;&#x4E0D;&#x76F8;&#x7B49;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x9000;&#x800C;&#x6C42;&#x5176;&#x6B21;&#xFF0C;&#x4F7F;&#x7528;&#x6A21;&#x7CCA;&#x5339;&#x914D;&#xFF0C;&#x7528;&#x81EA;&#x5DF1;&#x7684;&#x63A9;&#x7801; <code>255.255.255.0</code> &#x4E0E; <code>8.8.8.8</code> &#x505A;&#x6309;&#x4F4D;&#x4E0E;&#xFF0C;&#x5F97;&#x5230;&#x7F51;&#x6BB5; <code>8.8.8</code>&#xFF0C;&#x548C;&#x81EA;&#x5DF1; <code>10.10.10</code> &#x4E0D;&#x5728;&#x4E00;&#x4E2A;&#x7F51;&#x6BB5;&#xFF0C;&#x9700;&#x8981;&#x4F7F;&#x7528;<strong>&#x6700;&#x6A21;&#x7CCA;&#x7684;&#x5339;&#x914D;</strong>&#xFF0C;&#x4E00;&#x822C;&#x4F1A;&#x5339;&#x914D; <strong>0.0.0.0/0</strong>&#xFF0C;&#x8FD9;&#x4E2A;&#x662F;&#x6700;&#x540E;&#x7684;&#x9009;&#x62E9;&#xFF0C;&#x4E00;&#x822C;&#x6307;&#x5411;&#x7F51;&#x5173;&#xFF0C;&#x7531;&#x4E8E;&#x7F51;&#x5173;&#x548C;&#x81EA;&#x5DF1;&#x5728;&#x4E00;&#x4E2A;&#x7F51;&#x6BB5;&#xFF08;&#x4E00;&#x4E2A;&#x5E7F;&#x64AD;&#x57DF;&#xFF09;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x5E7F;&#x64AD; ARP &#x5F97;&#x5230;&#x7F51;&#x5173;&#x7684;MAC&#xFF0C;&#x7136;&#x540E;&#x628A; ping &#x5305;&#x53D1;&#x7ED9;&#x7F51;&#x5173;&#xFF0C;&#x5B8C;&#x6210;&#x901A;&#x4FE1;</p>
</li>
</ul>
<p><strong><code>GateWay - &#x7F51;&#x5173;</code></strong></p>
<ul>
<li><p>&#x7F51;&#x5173; - &#x662F;&#x4E00;&#x4E2A;&#x7F51;&#x7EDC;&#x901A;&#x5411;&#x5176;&#x4ED6;&#x7F51;&#x7EDC;&#x7684; IP &#x5730;&#x5740;</p>
</li>
<li><p>&#x6BD4;&#x5982;&#x6709;&#x7F51;&#x7EDC; A &#x548C;&#x7F51;&#x7EDC; B&#xFF0C;&#x7F51;&#x7EDC; A &#x7684; IP &#x5730;&#x5740;&#x8303;&#x56F4;&#x4E3A; <code>192.168.1.1~192. 168.1.254</code>&#xFF0C;&#x5B50;&#x7F51;&#x63A9;&#x7801;&#x4E3A; <code>255.255.255.0</code>&#xFF1B;&#x7F51;&#x7EDC; B &#x7684; IP &#x5730;&#x5740;&#x8303;&#x56F4;&#x4E3A; <code>192.168.2.1~192.168.2.254</code>&#xFF0C;&#x5B50;&#x7F51;&#x63A9;&#x7801;&#x4E3A; <code>255.255.255.0</code>&#x3002;&#x5728;&#x6CA1;&#x6709;<strong>&#x8DEF;&#x7531;&#x5668;</strong>&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x4E24;&#x4E2A;&#x7F51;&#x7EDC;&#x4E4B;&#x95F4;&#x662F;&#x4E0D;&#x80FD;&#x8FDB;&#x884C; TCP/IP &#x901A;&#x4FE1;&#x7684;&#xFF0C;&#x5373;&#x4F7F;&#x662F;&#x4E24;&#x4E2A;&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#x5728;&#x540C;&#x4E00;&#x53F0;&#x4EA4;&#x6362;&#x673A;&#xFF08;&#x6216;&#x96C6;&#x7EBF;&#x5668;&#xFF09;&#x4E0A;&#xFF0C;TCP/IP &#x534F;&#x8BAE;&#x4E5F;&#x4F1A;&#x6839;&#x636E;&#x5B50;&#x7F51;&#x63A9;&#x7801;&#xFF08; 255.255.255.0 &#xFF09;&#x5224;&#x5B9A;&#x4E24;&#x4E2A;&#x7F51;&#x7EDC;&#x4E2D;&#x7684;&#x4E3B;&#x673A;&#x5904;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x7F51;&#x7EDC;&#x91CC;&#x3002;&#x800C;&#x8981;&#x5B9E;&#x73B0;&#x8FD9;&#x4E24;&#x4E2A;&#x7F51;&#x7EDC;&#x4E4B;&#x95F4;&#x7684;&#x901A;&#x4FE1;&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x901A;&#x8FC7;&#x7F51;&#x5173; ( &#x6BD4;&#x5982;&#x8DEF;&#x7531;&#x5668; )</p>
</li>
<li>&#x5982;&#x679C;&#x7F51;&#x7EDC; A &#x4E2D;&#x7684;&#x4E3B;&#x673A;&#x53D1;&#x73B0;&#x6570;&#x636E;&#x5305;&#x7684;&#x76EE;&#x7684;&#x4E3B;&#x673A;&#x4E0D;&#x5728;&#x672C;&#x5730;&#x7F51;&#x7EDC;&#x4E2D;&#xFF0C;&#x5C31;&#x628A;&#x6570;&#x636E;&#x5305;&#x8F6C;&#x53D1;&#x7ED9;&#x5B83;&#x81EA;&#x5DF1;&#x7684;&#x7F51;&#x5173;&#xFF0C;&#x518D;&#x7531;&#x7F51;&#x5173;&#x8F6C;&#x53D1;&#x7ED9;&#x7F51;&#x7EDC; B &#x7684;&#x7F51;&#x5173;&#xFF0C;&#x7F51;&#x7EDC; B &#x7684;&#x7F51;&#x5173;&#x518D;&#x8F6C;&#x53D1;&#x7ED9;&#x7F51;&#x7EDC; B &#x7684;&#x67D0;&#x4E2A;&#x4E3B;&#x673A;</li>
</ul>
<p><strong><code>DNS - Domain Name Server - &#x57DF;&#x540D;&#x670D;&#x52A1;&#x5668;</code></strong></p>
<p>&#x5C06; URL &#x89E3;&#x6790;&#x6210;&#x4E3B;&#x673A; IP &#x5730;&#x5740;</p>
<h3 id="2&#x3001;&#x5E38;&#x89C1;&#x7F51;&#x5361;&#x8BE6;&#x89E3;"><a name="2&#x3001;&#x5E38;&#x89C1;&#x7F51;&#x5361;&#x8BE6;&#x89E3;" class="plugin-anchor" href="#2&#x3001;&#x5E38;&#x89C1;&#x7F51;&#x5361;&#x8BE6;&#x89E3;"><i class="fa fa-link" aria-hidden="true"></i></a>2&#x3001;&#x5E38;&#x89C1;&#x7F51;&#x5361;&#x8BE6;&#x89E3;</h3>
<p>&#x200B;    &#x670D;&#x52A1;&#x5668;&#x901A;&#x5E38;&#x6709;&#x591A;&#x5757;&#x7F51;&#x5361;&#xFF0C;&#x6709;&#x677F;&#x8F7D;&#x96C6;&#x6210;&#x7684;&#xFF0C;&#x540C;&#x65F6;&#x4E5F;&#x6709;&#x63D2;&#x5728; PCIe &#x63D2;&#x69FD;&#x7684;&#x3002;Linux &#x7CFB;&#x7EDF;&#x7684;&#x547D;&#x540D;&#x539F;&#x6765;&#x662F; eth0,eth1 &#x8FD9;&#x6837;&#x7684;&#x5F62;&#x5F0F;&#xFF0C;&#x4F46;&#x662F;&#x8FD9;&#x4E2A;&#x7F16;&#x53F7;&#x5F80;&#x5F80;&#x4E0D;&#x4E00;&#x5B9A;&#x51C6;&#x786E;&#x5BF9;&#x5E94;&#x7F51;&#x5361;&#x63A5;&#x53E3;&#x7684;&#x7269;&#x7406;&#x987A;&#x5E8F;</p>
<p><strong><code>&#x7F51;&#x5361;&#x67E5;&#x770B;&#x65B9;&#x6CD5;</code></strong></p>
<ol>
<li><code>ip a</code></li>
<li><code>ifconfig</code></li>
<li>&#x4EE5;&#x4E0A;&#x547D;&#x4EE4;&#x90FD;&#x6CA1;&#x5B89;&#x88C5;&#xFF0C;&#x8FD8;&#x53EF;&#x76F4;&#x63A5;&#x8BFB;&#x53D6;&#x6587;&#x4EF6; <code>cat /proc/net/dev</code></li>
</ol>
<p><strong><code>&#x5224;&#x65AD;&#x7F51;&#x5361;&#x662F;&#x865A;&#x62DF;&#x8FD8;&#x662F;&#x7269;&#x7406;&#x7F51;&#x5361;</code></strong></p>
<pre><code class="lang-bash"><span class="hljs-comment"># /sys/devices/virtual/net &#x76EE;&#x5F55;&#x4E0B;&#x90FD;&#x662F;&#x865A;&#x62DF;&#x7F51;&#x5361;</span>
$ ls  <span class="hljs-_">-l</span> /sys/devices/virtual/net
&#x603B;&#x7528;&#x91CF; 0
drwxr-xr-x 7 root root 0 Nov 22 16:48 docker0
drwxr-xr-x 5 root root 0 Nov 22 16:48 lo
drwxr-xr-x 6 root root 0 Nov 22 16:48 veth61d2c91
drwxr-xr-x 6 root root 0 Nov 22 16:48 vethbe484a2
</code></pre>
<p><strong><code>&#x7269;&#x7406;&#x7F51;&#x5361;</code></strong></p>
<ol>
<li><code>eno1</code> - &#x4EE3;&#x8868;&#x7531;&#x4E3B;&#x677F; bios &#x5185;&#x7F6E;&#x7684;&#x7F51;&#x5361;&#xFF0C;&#x5982;&#x679C;&#x4ECE; BIOS &#x4E2D;&#x80FD;&#x591F;&#x53D6;&#x5230;&#x53EF;&#x7528;&#x7684;&#xFF0C;&#x677F;&#x8F7D;&#x7F51;&#x5361;&#x7684;&#x7D22;&#x5F15;&#x53F7;&#xFF0C;&#x5219;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x7D22;&#x5F15;&#x53F7;&#x547D;&#x540D;&#xFF0C;&#x4F8B;&#x5982;: eno1</li>
<li><code>ens1</code> - &#x4EE3;&#x8868;&#x6709;&#x4E3B;&#x677F; bios &#x5185;&#x7F6E;&#x7684; PCI-E &#x7F51;&#x5361;&#xFF0C;&#x5982;&#x679C;&#x4ECE;BIOS&#x4E2D;&#x80FD;&#x591F;&#x53D6;&#x5230;&#x53EF;&#x4EE5;&#x7528;&#x7684;&#xFF0C;&#x7F51;&#x5361;&#x6240;&#x5728;&#x7684;PCI-E&#x70ED;&#x63D2;&#x62D4;&#x63D2;&#x69FD;(<strong><em>\</em>&#x6CE8;&#xFF1A;pci&#x69FD;&#x4F4D;&#x53F7;)**</strong>&#x7684;&#x7D22;&#x5F15;&#x53F7;&#xFF0C;&#x5219;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x7D22;&#x5F15;&#x53F7;&#x547D;&#x540D;&#xFF0C;&#x4F8B;&#x5982;: ens1</li>
<li><code>enp2s0</code> - PCI-E &#x72EC;&#x7ACB;&#x7F51;&#x5361;&#xFF0C;&#x5982;&#x679C;&#x80FD;&#x62FF;&#x5230;&#x8BBE;&#x5907;&#x6240;&#x8FDE;&#x63A5;&#x7684;&#x7269;&#x7406;&#x4F4D;&#x7F6E;&#xFF08;PCI&#x603B;&#x7EBF;&#x53F7;+&#x69FD;&#x4F4D;&#x53F7;&#xFF09;&#x4FE1;&#x606F;&#xFF0C;&#x5219;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x4FE1;&#x606F;&#x547D;&#x540D;&#xFF0C;&#x4F8B;&#x5982;: enp2s0</li>
<li><code>eth0&#x3001;eth1&#x3001;eth2 ...</code> - &#x5982;&#x679C;&#x4EE5;&#x4E0A;&#x90FD;&#x4E0D;&#x4F7F;&#x7528;&#xFF0C;&#x5219;&#x56DE;&#x5230;&#x9ED8;&#x8BA4;&#x7684;&#x7F51;&#x5361;&#x540D;&#xFF0C;&#x7EDF;&#x4E00;&#x7684; kernel &#x547D;&#x540D;&#x65B9;&#x6CD5;&#xFF0C;&#x4F8B;&#x5982;: eth0&#xFF0C;&#x8FD9;&#x79CD;&#x547D;&#x540D;&#x65B9;&#x6CD5;&#x7684;&#x7ED3;&#x679C;&#x4E0D;&#x53EF;&#x9884;&#x77E5;&#x7684;&#xFF0C;&#x5373;&#x53EF;&#x80FD;&#x7B2C;&#x4E8C;&#x5757;&#x7F51;&#x5361;&#x5BF9;&#x5E94; eth0&#xFF0C;&#x7B2C;&#x4E00;&#x5757;&#x7F51;&#x5361;&#x5BF9;&#x5E94; eth1</li>
</ol>
<p><strong><code>&#x865A;&#x62DF;&#x7F51;&#x5361;</code></strong></p>
<ul>
<li>&#x865A;&#x62DF;&#x7F51;&#x7EDC;&#x63A5;&#x53E3;&#x5E76;&#x4E0D;&#x771F;&#x5B9E;&#x5730;&#x4ECE;&#x5916;&#x754C;&#x63A5;&#x6536;&#x548C;&#x53D1;&#x9001;&#x6570;&#x636E;&#x5305;&#xFF0C;&#x800C;&#x662F;&#x5728;&#x7CFB;&#x7EDF;&#x5185;&#x90E8;&#x63A5;&#x6536;&#x548C;&#x53D1;&#x9001;&#x6570;&#x636E;&#x5305;&#xFF0C;&#x56E0;&#x6B64;&#x865A;&#x62DF;&#x7F51;&#x7EDC;&#x63A5;&#x53E3;&#x4E0D;&#x9700;&#x8981;&#x9A71;&#x52A8;&#x7A0B;&#x5E8F;</li>
<li><p>&#x865A;&#x62DF;&#x7F51;&#x5361;&#x548C;&#x7269;&#x7406;&#x7F51;&#x5361;&#x5728;&#x4F7F;&#x7528;&#x4E0A;&#x662F;&#x4E00;&#x81F4;&#x7684;</p>
</li>
<li><p><code>lo</code> -  localhost - &#x672C;&#x5730;&#x73AF;&#x56DE;&#x63A5;&#x53E3;&#xFF0C;ip &#x662F; 127.0.0.1&#xFF0C;&#x5B9E;&#x73B0;&#x7CFB;&#x7EDF;&#x5185;&#x90E8;&#x53D1;&#x9001;&#x548C;&#x63A5;&#x6536;&#x6570;&#x636E;</p>
</li>
<li><code>docker0</code> - docker &#x5728;&#x5BBF;&#x4E3B;&#x673A;&#x4E2D;&#x7684;&#x7F51;&#x5361;</li>
</ul>
<h3 id="3-linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x6587;&#x4EF6;"><a name="3-linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x6587;&#x4EF6;" class="plugin-anchor" href="#3-linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x6587;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>3. Linux &#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h3>
<h4 id="i&#x3001;centos-&#x7CFB;&#x5217;"><a name="i&#x3001;centos-&#x7CFB;&#x5217;" class="plugin-anchor" href="#i&#x3001;centos-&#x7CFB;&#x5217;"><i class="fa fa-link" aria-hidden="true"></i></a>I&#x3001;CentOS &#x7CFB;&#x5217;</h4>
<ul>
<li><strong><code>/etc/sysconfig/network-scripts/</code></strong> - &#x7F51;&#x5361;&#x7684;&#x63A7;&#x5236;&#x6587;&#x4EF6;&#x76EE;&#x5F55;</li>
</ul>
<pre><code class="lang-bash">$ ls /etc/sysconfig/network-scripts/
ifcfg-eth0   ifdown-ib    ifdown-ppp       ifdown-tunnel  ifup-ib    ifup-plusb   ifup-Team         network-functions
ifcfg-lo     ifdown-ippp  ifdown-routes    ifup           ifup-ippp  ifup-post    ifup-TeamPort     network-functions-ipv6
ifdown       ifdown-ipv6  ifdown-sit       ifup-aliases   ifup-ipv6  ifup-ppp     ifup-tunnel
ifdown-bnep  ifdown-isdn  ifdown-Team      ifup-bnep      ifup-isdn  ifup-routes  ifup-wireless
ifdown-eth   ifdown-post  ifdown-TeamPort  ifup-eth       ifup-plip  ifup-sit     init.ipv6-global
</code></pre>
<ul>
<li><p><strong><code>/etc/sysconfig/network-scripts/ifcfg-eth0</code></strong> - &#x7F51;&#x5361;&#x4FE1;&#x606F;&#x6587;&#x4EF6;</p>
<pre><code class="lang-bash">    DEVICE=eth0  <span class="hljs-comment">#&#x7F51;&#x5361;&#x8BBE;&#x5907;&#x540D;&#x79F0;   </span>
    ONBOOT=yes  <span class="hljs-comment">#&#x542F;&#x52A8;&#x65F6;&#x662F;&#x5426;&#x6FC0;&#x6D3B; yes | no  </span>
    BOOTPROTO=static  <span class="hljs-comment">#&#x534F;&#x8BAE;&#x7C7B;&#x578B; dhcp bootp none  </span>
    IPADDR=192.168.1.90  <span class="hljs-comment">#&#x7F51;&#x7EDC;IP&#x5730;&#x5740;  </span>
    NETMASK=255.255.255.0  <span class="hljs-comment">#&#x7F51;&#x7EDC;&#x5B50;&#x7F51;&#x5730;&#x5740;  </span>
    GATEWAY=192.168.1.1  <span class="hljs-comment">#&#x7F51;&#x5173;&#x5730;&#x5740;  </span>
    BROADCAST=192.168.1.255  <span class="hljs-comment">#&#x5E7F;&#x64AD;&#x5730;&#x5740;  </span>
    HWADDR=00:0C:29:FE:1A:09  <span class="hljs-comment">#&#x7F51;&#x5361;MAC&#x5730;&#x5740;  </span>
    TYPE=Ethernet  <span class="hljs-comment">#&#x7F51;&#x5361;&#x7C7B;&#x578B;&#x4E3A;&#x4EE5;&#x592A;&#x7F51;</span>
</code></pre>
<ul>
<li>TYPE    &#x7F51;&#x7EDC;&#x7C7B;&#x578B;&#xFF08;&#x901A;&#x5E38;&#x662F; Ethemet&#xFF09;</li>
<li>DEVICE    &#x63A5;&#x53E3;&#x540D;&#xFF08;&#x8BBE;&#x5907;,&#x7F51;&#x5361;&#xFF09;</li>
<li>USERCTL   [yes|no]&#xFF08;&#x975E;root&#x7528;&#x6237;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x63A7;&#x5236;&#x8BE5;&#x8BBE;&#x5907;&#xFF09;</li>
<li>BOOTPROTO  IP &#x7684;&#x914D;&#x7F6E;&#x65B9;&#x6CD5; [none|static|bootp|dhcp]&#xFF08;&#x5F15;&#x5BFC;&#x65F6;&#x4E0D;&#x4F7F;&#x7528;&#x534F;&#x8BAE;|&#x9759;&#x6001;&#x5206;&#x914D;IP|BOOTP&#x534F;&#x8BAE;|DHCP&#x534F;&#x8BAE;&#xFF09;</li>
<li>HWADDR    MAC&#x5730;&#x5740;  </li>
<li>ONBOOT    &#x7CFB;&#x7EDF;&#x542F;&#x52A8;&#x7684;&#x65F6;&#x5019;&#x7F51;&#x7EDC;&#x63A5;&#x53E3;&#x662F;&#x5426;&#x6709;&#x6548;&#xFF08;yes/no&#xFF09;    </li>
<li>NETMASK    &#x7F51;&#x7EDC;&#x63A9;&#x7801;  </li>
<li>IPADDR    IP &#x5730;&#x5740;  </li>
<li>IPV6INIT  IPV6 &#x662F;&#x5426;&#x6709;&#x6548;&#xFF08;yes/no&#xFF09;  </li>
<li>GATEWAY    &#x9ED8;&#x8BA4;&#x7F51;&#x5173;IP&#x5730;&#x5740;</li>
<li>BROADCAST   &#x5E7F;&#x64AD;&#x5730;&#x5740;</li>
<li>NETWORK &#x7F51;&#x7EDC;&#x5730;&#x5740;</li>
<li>DNS1  &#x7B2C;&#x4E00; DNS &#x670D;&#x52A1;&#x5668;&#x6307;&#x5411;&#xFF1B;</li>
<li>DNS2  &#x5907;&#x7528; DNS &#x670D;&#x52A1;&#x5668;&#x6307;&#x5411;&#xFF1B;</li>
</ul>
</li>
</ul>
<blockquote>
<ul>
<li>&#x4FEE;&#x6539; <strong><code>/etc/sysconfig/network-scripts/ifcfg-eth0</code></strong>  &#x6587;&#x4EF6;&#x540E;&#x9700;&#x8981;&#x91CD;&#x542F;&#x7F51;&#x5361; ( sudo systemctl restart network )&#x6216;&#x7535;&#x8111;</li>
</ul>
</blockquote>
<p><strong><code>/etc/sysconfig/network</code></strong></p>
<p><strong><code>/etc/resolv.conf</code></strong> - DNS &#x914D;&#x7F6E;&#x6587;&#x4EF6;</p>
<p><strong><code>/etc/hostname</code></strong> -  &#x4E3B;&#x673A;&#x540D;</p>
<p><strong><code>/etc/hosts</code></strong></p>
<h4 id="ii&#x3001;ubuntu-&#x7CFB;&#x5217;"><a name="ii&#x3001;ubuntu-&#x7CFB;&#x5217;" class="plugin-anchor" href="#ii&#x3001;ubuntu-&#x7CFB;&#x5217;"><i class="fa fa-link" aria-hidden="true"></i></a>II&#x3001;Ubuntu &#x7CFB;&#x5217;</h4>
<p><strong><code>/etc/network</code></strong> </p>
<p><strong><code>/etc/network/interfaces</code></strong> - ip&#x3001;&#x5B50;&#x7F51;&#x63A9;&#x7801;&#x3001;&#x9ED8;&#x8BA4;&#x7F51;&#x5173;</p>
<p><strong><code>/etc/NetworkManager/</code></strong></p>
<p><strong><code>/etc/hostname</code></strong> -  &#x4E3B;&#x673A;&#x540D;</p>
<p><strong><code>/etc/resolv.conf</code></strong> - DNS &#x914D;&#x7F6E;&#x6587;&#x4EF6;</p>
<p><strong><code>/etc/hosts</code></strong></p>
<h2 id="linux-&#x4E3B;&#x673A;&#x5E38;&#x7528;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;"><a name="linux-&#x4E3B;&#x673A;&#x5E38;&#x7528;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;" class="plugin-anchor" href="#linux-&#x4E3B;&#x673A;&#x5E38;&#x7528;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>Linux &#x4E3B;&#x673A;&#x5E38;&#x7528;&#x7F51;&#x7EDC;&#x914D;&#x7F6E;</h2>
<h4 id="i-ubuntu"><a name="i-ubuntu" class="plugin-anchor" href="#i-ubuntu"><i class="fa fa-link" aria-hidden="true"></i></a>I. Ubuntu</h4>
<p><strong><code>&#x8BBE;&#x7F6E;&#x9759;&#x6001; IP</code></strong></p>
<pre><code class="lang-bash">$ vim /etc/network/interface
<span class="hljs-comment"># &#x5728; interface &#x6DFB;&#x52A0; eth0 &#x63A5;&#x53E3;&#x7684; IP&#xFF0C;&#x7F51;&#x7EDC;&#x53F7;&#xFF0C;&#x63A9;&#x7801;&#xFF0C;&#x5E7F;&#x64AD;&#x5730;&#x5740;&#x548C;&#x7F51;&#x5173;</span>
auto eth0
iface eth0 inet static
       address 192.168.2.100
       network 192.168.2.0
       netmask 255.255.255.0
       broadcast 192.168.0.255
       gateway 192.168.0.1
</code></pre>
<p><strong><code>&#x91CD;&#x542F;&#x7F51;&#x5361;</code></strong></p>
<pre><code class="lang-bash">$ sudo ifup eth0
$ sudo ifdown eth0
<span class="hljs-comment"># &#x6216;</span>
$ sudo ifconfig eth0 down
$ sudo ifconfig eth0 up
</code></pre>
<p><strong><code>&#x91CD;&#x542F;&#x7F51;&#x7EDC;</code></strong></p>
<pre><code class="lang-bash">`sudo` `/etc/init``.d``/networking` `restart``sudo` `/etc/init``.d``/network-manager` `restart`
</code></pre>
<p><strong>``</strong></p>
<p><strong>``</strong></p>
<p><strong>``</strong></p>
<h3 id="2"><a name="2" class="plugin-anchor" href="#2"><i class="fa fa-link" aria-hidden="true"></i></a>2.</h3>
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center">NAT</th>
<th style="text-align:center">Bridged Adapter</th>
<th style="text-align:center">Host-Only</th>
</tr>
</thead>
<tbody>
<tr>
<td>VM -&gt; Host</td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td>Host -&gt; VM</td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_multiplication_x:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_multiplication_x.png" title=":heavy_multiplication_x:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td>VM &lt;-&gt; VM</td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
</tr>
<tr>
<td>VM -&gt; Other Host</td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
<td style="text-align:center"></td>
</tr>
<tr>
<td>Other Host -&gt; VM</td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_multiplication_x:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_multiplication_x.png" title=":heavy_multiplication_x:"></td>
<td style="text-align:center"><img align="absmiddle" alt=":heavy_check_mark:" class="emoji" src="../gitbook/gitbook-plugin-advanced-emoji/emojis/heavy_check_mark.png" title=":heavy_check_mark:"></td>
</tr>
</tbody>
</table>
<p><img src="images/VM&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#x65B9;&#x5F0F;.png" alt="VM&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#x65B9;&#x5F0F;"></p>
<h2 id="&#x6865;&#x63A5;---bridged-adapter"><a name="&#x6865;&#x63A5;---bridged-adapter" class="plugin-anchor" href="#&#x6865;&#x63A5;---bridged-adapter"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6865;&#x63A5; - Bridged Adapter</h2>
<ul>
<li><p>&#x865A;&#x62DF;&#x673A;&#x548C;&#x4E3B;&#x673A;&#x662F;&#x5904;&#x4E8E;&#x540C;&#x7B49;&#x5730;&#x4F4D;&#x7684;&#x673A;&#x5668;&#xFF0C;&#x6240;&#x4EE5;&#x7F51;&#x7EDC;&#x529F;&#x80FD;&#x4E5F;&#x65E0;&#x5F02;&#x4E8E;&#x4E3B;&#x673A;&#x3002;&#x5E76;&#x4E14;&#x548C;&#x4E3B;&#x673A;&#x5904;&#x4E8E;&#x540C;&#x4E00;&#x7F51;&#x6BB5;</p>
</li>
<li><h4 id="&#x539F;&#x7406;"><a name="&#x539F;&#x7406;" class="plugin-anchor" href="#&#x539F;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x539F;&#x7406;</h4>
<p>&#x6865;&#x63A5;&#x6A21;&#x5F0F;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x662F;VMnet0&#x865A;&#x62DF;&#x7F51;&#x5361;&#x3002;
 vmnet0&#x5B9E;&#x9645;&#x4E0A;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x865A;&#x62DF;&#x7684;&#x7F51;&#x6865;(2&#x5C42;&#x4EA4;&#x6362;&#x673A;)&#xFF0C;&#x8FD9;&#x4E2A;&#x7F51;&#x6865;&#x6709;&#x82E5;&#x5E72;&#x4E2A;&#x63A5;&#x53E3;&#xFF0C;&#x4E00;&#x4E2A;&#x7AEF;&#x53E3;&#x7528;&#x4E8E;&#x8FDE;&#x63A5;&#x4F60;&#x7684;Host&#x4E3B;&#x673A;&#xFF0C;&#x5176;&#x4F59;&#x7AEF;&#x53E3;&#x53EF;&#x4EE5;&#x7528;&#x4E8E;&#x8FDE;&#x63A5;&#x865A;&#x62DF;&#x673A;&#xFF0C;&#x4ED6;&#x4EEC;&#x7684;&#x4F4D;&#x7F6E;&#x662F;&#x5BF9;&#x7B49;&#x7684;&#xFF0C;&#x8C01;&#x4E5F;&#x4E0D;&#x662F;&#x8C01;&#x7684;&#x7F51;&#x5173;&#x3002;&#x6240;&#x4EE5;&#x6865;&#x63A5;&#x6A21;&#x5F0F;&#x4E0B;&#xFF0C;&#x865A;&#x62DF;&#x673A;&#x548C;Host&#x4E3B;&#x673A;&#x662F;&#x540C;&#x7B49;&#x5730;&#x4F4D;&#x7684;&#x4E3B;&#x673A;</p>
<p><img src="images/bridged.jpg" alt="012"></p>
</li>
</ul>
<p>&#x914D;&#x7F6E;</p>
<p><code>/etc/sysconfig/network-scripts/ifcfg-enp0s3</code></p>
<h2 id="nat---network-address-translation---&#x7F51;&#x7EDC;&#x5730;&#x5740;&#x8F6C;&#x6362;"><a name="nat---network-address-translation---&#x7F51;&#x7EDC;&#x5730;&#x5740;&#x8F6C;&#x6362;" class="plugin-anchor" href="#nat---network-address-translation---&#x7F51;&#x7EDC;&#x5730;&#x5740;&#x8F6C;&#x6362;"><i class="fa fa-link" aria-hidden="true"></i></a>NAT - Network address translation - &#x7F51;&#x7EDC;&#x5730;&#x5740;&#x8F6C;&#x6362;</h2>
<h2 id="linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x547D;&#x4EE4;"><a name="linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x547D;&#x4EE4;" class="plugin-anchor" href="#linux-&#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>Linux &#x7F51;&#x7EDC;&#x914D;&#x7F6E;&#x547D;&#x4EE4;</h2>
<p>ifconfig - &#x7F51;&#x5361;&#x914D;&#x7F6E;</p>
<h2 id="&#x3010;&#x53C2;&#x8003;&#x3011;"><a name="&#x3010;&#x53C2;&#x8003;&#x3011;" class="plugin-anchor" href="#&#x3010;&#x53C2;&#x8003;&#x3011;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x3010;&#x53C2;&#x8003;&#x3011;</h2>
<ul>
<li><p><a href="https://blog.csdn.net/hzj_001/article/details/81587824" target="_blank">linux&#x7F51;&#x5361;&#x547D;&#x540D;&#x89C4;&#x5219;</a></p>
</li>
<li><p><a href="https://www.cnblogs.com/JuneWang/p/3917697.html" target="_blank">IP&#x5730;&#x5740;&#xFF0C;&#x5B50;&#x7F51;&#x63A9;&#x7801;&#xFF0C;&#x9ED8;&#x8BA4;&#x7F51;&#x5173;&#xFF0C;DNS&#x670D;&#x52A1;&#x5668;&#x8BE6;&#x89E3;</a></p>
</li>
</ul>
<footer class="page-footer-ex"> <span class="page-footer-ex-copyright"> <a href="https://github.com/Xiechengqi" target="_blank">Xiechengqi</a> </span> &#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0; <span class="page-footer-ex-footer-update"> <strong>&#x6700;&#x65B0;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;</strong> 2020-01-04 15:54:38 </span> </footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="APT-剖析详解.html" class="navigation navigation-prev " aria-label="Previous page: APT 原理剖析、详解">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Linux文件系统学习.html" class="navigation navigation-next " aria-label="Next page: Linux文件系统学习">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Linux 主机、虚拟机和docker网络配置","level":"1.4.6","depth":2,"next":{"title":"Linux文件系统学习","level":"1.4.7","depth":2,"path":"Linux/Linux文件系统学习.md","ref":"Linux/Linux文件系统学习.md","articles":[]},"previous":{"title":"APT 原理剖析、详解","level":"1.4.5","depth":2,"path":"Linux/APT-剖析详解.md","ref":"Linux/APT-剖析详解.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","-livereload","-sharing","expandable-chapters","popup","pageview-count","code","back-to-top-button","hide-element","github-buttons","github","splitter","search-pro","anchors","page-footer-ex","advanced-emoji","sharing-plus"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"github":{"url":"https://github.com/Xiechengqi/LearningNotes"},"page-footer-ex":{"copyright":"[Xiechengqi](https://github.com/Xiechengqi)","markdown":true,"update_format":"YYYY-MM-DD HH:mm:ss","update_label":"<strong>最新修订时间：</strong>"},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"hide-element":{"elements":[".gitbook-link"]},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"buttons":[{"user":"Xiechengqi","repo":"LearningNotes","type":"star","size":"small","count":true}]},"advanced-emoji":{"embedEmojis":false},"sharing":{"qq":false,"douban":false,"facebook":false,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"日常学习笔记","language":"zh-hans","gitbook":"*","description":"日常学习笔记"},"file":{"path":"Linux/Linux主机、虚拟机和docker网络配置.md","mtime":"2020-01-04T07:54:38.896Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-03-28T02:57:41.582Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-hide-element/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

